<html>
    <head>
        <title>ds_hitmarker by drct-serv.xyz</title>
        <script src="nui://game/ui/jquery.js" type="text/javascript"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.1.1/howler.min.js" type="text/javascript"></script>
        <script>
            var audioPlayer = null;
            window.addEventListener('message', function(event) {
                if (event.data.type == "play") {
				
                  if (audioPlayer != null) {
                    audioPlayer.pause();
                  }

                  audioPlayer = new Howl({src: ["./sound/" + event.data.audio]});
                  audioPlayer.volume(event.data.volume);
                  audioPlayer.play();

                }
            });
        </script>
    </head>
</html>